import { createApp } from "vue";
import App from "./App.vue";
import router from "./router/index.js";
import { createPinia } from "pinia";
import piniaPluginPersist from "pinia-plugin-persist";
import Directives from "./directives/index.js";
import "./utils/socket_io";
import { install } from "./components/install";
import { VanInstall } from "./components/van/van-install";
import "element-plus/theme-chalk/index.css";
import 'xe-utils'
import { Column, Filter, Header, Icon, Table, Tooltip } from "vxe-table";

import "element-plus/theme-chalk/index.css";
import "animate.css/animate.min.css"; //引入
import { fontUrl } from "./utils/constant";
import { LoadStyle } from "./utils/utils";
import "./styles/index.less";

function useTable (app) {
  app
    .use(Header)
    // 可选组件
    .use(Column)
    // 安装表格
    .use(Table)
    .use(Icon)
    .use(Filter)
    .use(Tooltip);
}

LoadStyle(fontUrl);
const PinaStore = createPinia();
// piniaPluginPersist 与热加载无法同时使用
PinaStore.use(piniaPluginPersist);

const vue = createApp(App);
vue.use(PinaStore).use(router).use(Directives).use(install).use(VanInstall).use(useTable).mount("#app");
